package com.joysuch.wwyt.common.service;

import com.joysuch.wwyt.bp.entity.investigate.BpInvestigateTask;
import com.joysuch.wwyt.common.bean.NotifyQueryBean;
import com.joysuch.wwyt.common.entity.CommonIndexNotify;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.edu.bean.CommonBean;
import org.springframework.data.domain.Pageable;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @Author ZhangDong
 * @Date 2020/5/29 17:11
 */
public interface CommonIndexNotifyService {

    ResultBean getNotify();

    ResultBean readed(List<Long> list, Integer flag);

    ResultBean page(Pageable pageable, NotifyQueryBean bean);

    void cancelAndRemove(CommonIndexNotify notify);

    List<CommonIndexNotify> getByModelAndId(String modelName, Long modelId);

    void delete(Long id);

    void saveList(List<CommonIndexNotify> notifyList);

 
    void deleteByTypeAndRecordId(String type, Long recordId);

    List<CommonIndexNotify> getByTypeAndRecordId(String type, Long recordId);
 
    public void generateNotifyTask();


    public void generateNotifyJob();
    
    //发布考试通知提醒
    void  releaseExamReminder(Set<Long> userIds, Long examId, String type, Date startTime, String msgBody, CommonBean commonBean);

    void generateInvestigateTaskNotify(List<Long> userIds, String type, String msgBody, BpInvestigateTask task);

    boolean generateInvestigateTaskNotifyInRam(List<Long> userIds, String type, String msgBody, BpInvestigateTask task, List<CommonIndexNotify> list);

    boolean generateInvestigateTaskAssignNotifyInRam(List<Long> userIds, String type, String msgBody, BpInvestigateTask task, List<CommonIndexNotify> list);

    // app已读，同步到web
    void appRead(List<Long> refIds, String type,Long userId);

    // app删除，同步到web
    void appDelete(List<Long> refIds, String type,Long userId);
}
